home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / internet / net commander 1.0 / ISP / SCRPTLST / IDNET.CMD < prev    next >
Encoding:
Text File  |  1996-03-05  |  1.5 KB  |  91 lines

  1. #    Login.cmd for ID-Net, Innovative Data Services
  2. #
  3. #trace on
  4.  
  5. if ![load $username]
  6.   if [username "Enter your WinCONNECT login-id"]
  7.     save $username
  8.   end
  9. end
  10.  
  11. if ![load $password]
  12.   if [password "Enter your WinCONNECT password"]
  13.     save $password
  14.   end
  15. end
  16.  
  17. $number     = "1-810-718-7575"
  18. $dialstring = "DT"
  19. $modemsetup = "&C1&D2"
  20. $userprompt = "GATEWAY>"
  21. $passprompt = "assword:"
  22. $addrtarg = ") to "
  23. %attempts = 10
  24.  
  25. #
  26. #
  27. #----------------------------------------------------------
  28. #
  29. # initialize modem
  30. #
  31. output "atz"\13
  32. if ![input 10 OK\n]
  33.   display "Modem is not responding"\n
  34.   abort
  35. end
  36. #
  37. # setup our modem commands
  38. #
  39. output "AT"$modemsetup\13
  40. input 10 OK\n
  41. #
  42. # send phone number
  43. #
  44. %n = 0
  45. repeat
  46.   if %n = %attempts
  47.     display "Too many dial attempts"\n
  48.     abort
  49.   end
  50.   output "AT" $dialstring $number\13
  51.   %ok = [input 60 CONNECT]
  52.   %n = %n + 1
  53. until %ok
  54. input 10 \n
  55. #
  56. #  wait till it's safe to send because some modem's hang up
  57. #  if you transmit during the connection phase
  58. #
  59. wait 30 dcd
  60. #
  61. # now prod the terminal server
  62. #
  63. output \13
  64. #
  65. #  wait for the username prompt
  66. #
  67. input 30 $userprompt
  68. output $username\13
  69. #
  70. # and the password
  71. #
  72. input 30 $passprompt
  73. output $password\13
  74. #
  75. # we are now logged in,
  76. # wait for the address string
  77. #
  78. input 30 $addrtarg
  79. #
  80. # parse address
  81. #
  82. address 30
  83. #
  84. # we are now connected, logged in and in slip mode.
  85. #
  86. display \n
  87. display Connected.  Your IP address is \i.\n
  88. #
  89. # now we are finished.
  90. #
  91.